<?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('public/header', TEMPLATE_INCLUDEPATH)) : (include template('public/header', TEMPLATE_INCLUDEPATH));?>

<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('public/comhead', TEMPLATE_INCLUDEPATH)) : (include template('public/comhead', TEMPLATE_INCLUDEPATH));?>

<link rel="stylesheet" type="text/css" href="../addons/yzzc_sun/template/public/ygcss.css">

<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li class="active"><a href="javascript:void(0);">车辆信息</a></li>
    <li><a href="<?php  echo $this->createWebUrl('car');?>"><i class="fa fa-refresh"></i>返回车辆列表</a></li>
</ul>
<div class="main ygmain">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <div class="panel panel-default ygdefault">

            <div class="panel-heading wyheader">

                车辆信息

            </div>

            <div class="panel-body">
                <!-- <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">选择门店</label>
                    <div class="col-sm-10">
                        <select name="sid">
                            <?php  if(is_array($shop)) { foreach($shop as $sval) { ?>
                            <?php  if($info['sid']==$sval['id']) { ?>
                            <option value="<?php  echo $sval['id'];?>" selected="selected"><?php  echo $sval['name'];?></option>
                            <?php  } else { ?>
                            <option value="<?php  echo $sval['id'];?>"><?php  echo $sval['name'];?></option>
                            <?php  } ?>
                            <?php  } } ?>
                        </select>
                    </div>
                </div> -->
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">默认排序</label>
                    <div class="col-sm-9">
                        <input type="number" name="sort" class="form-control" value="<?php  echo $info['sort'];?>" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">选择品牌</label>
                    <div class="col-sm-10">
                        <select name="carbrand" style='width:100px'>
                            <?php  if(is_array($shop)) { foreach($shop as $sval) { ?>
                            <?php  if($info['carbrand']==$sval['id']) { ?>
                            <option value="<?php  echo $sval['id'];?>" selected="selected"><?php  echo $sval['name'];?></option>
                            <?php  } else { ?>
                            <option value="<?php  echo $sval['id'];?>"><?php  echo $sval['name'];?></option>
                            <?php  } ?>
                            <?php  } } ?>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">选择所在地</label>
                    <div class="col-sm-10">
                        <select name="carcity" style='width:100px'>
                            <?php  if(is_array($cartype)) { foreach($cartype as $sval) { ?>
                            <?php  if($info['carcity']==$sval['id']) { ?>
                            <option value="<?php  echo $sval['id'];?>" selected="selected"><?php  echo $sval['name'];?></option>
                            <?php  } else { ?>
                            <option value="<?php  echo $sval['id'];?>"><?php  echo $sval['name'];?></option>
                            <?php  } ?>
                            <?php  } } ?>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">车辆名称</label>
                    <div class="col-sm-9">
                        <input type="text" name="name" class="form-control" value="<?php  echo $info['name'];?>"  />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">车牌号码</label>
                    <div class="col-sm-9">
                        <input type="text" name="carnum" class="form-control" value="<?php  echo $info['carnum'];?>" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">车牌类型</label>
                    <div class="col-sm-9">
                        <input type="text" name="cartype" class="form-control" value="<?php  echo $info['cartype'];?>" placeholder="如轿车、SUV等等" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">车身颜色</label>
                    <div class="col-sm-9">
                        <input type="text" name="color" class="form-control" value="<?php  echo $info['color'];?>" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">预约电话</label>
                    <div class="col-sm-9">
                        <input type="number" name="phone" class="form-control" value="<?php  echo $info['phone'];?>" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">里程</label>
                    <div class="col-sm-9">
                        <input type="number" name="mileage" class="form-control" value="<?php  echo $info['mileage'];?>" />
                    </div>
                </div>
                <!-- <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">车辆结构</label>
                    <div class="col-sm-10">
                        <input type="radio" value="1" name="structure" <?php  if($info['structure']==1 || empty($info['structure'])) { ?>checked<?php  } ?> >两厢
                        <input type="radio" value="2" name="structure" <?php  if($info['structure']==2) { ?>checked<?php  } ?> >三厢
                    </div>
                </div> -->
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">变速箱</label>
                    <div class="col-sm-10">
                        <input type="radio" value="1" name="grarbox" <?php  if($info['grarbox']==1 || empty($info['grarbox'])) { ?>checked<?php  } ?> >手动挡
                        <input type="radio" value="2" name="grarbox" <?php  if($info['grarbox']==2 ) { ?>checked<?php  } ?> >自动挡
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">汽车排量</label>
                    <div class="col-sm-9">
                        <input type="text" name="displacement" class="form-control" value="<?php  echo $info['displacement'];?>" placeholder="如1.5L、2L等" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">过户次数</label>
                    <div class="col-sm-9">
                        <input type="number" name="num" class="form-control" value="<?php  echo $info['num'];?>" />
                    </div>
                </div>

                <div class="form-group" id="datetimepicker">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">上牌时间</label>

                    <div class="col-sm-9">
                        <?php  echo tpl_form_field_date('registrationtime',$info['registrationtime'],false)?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">首付</label>
                    <div class="col-sm-9">
                        <input type="text" name="money" class="form-control" value="<?php  echo $info['money'];?>" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">月供</label>
                    <div class="col-sm-9">
                        <input type="text" name="monthmoney" class="form-control" value="<?php  echo $info['monthmoney'];?>" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">官方指导价</label>
                    <div class="col-sm-9">
                        <input type="text" name="guidemoney" class="form-control" value="<?php  echo $info['guidemoney'];?>" />
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">是否推荐至首页</label>
                    <div class="col-sm-10">
                        <input type="radio" value="1" name="rec" <?php  if($info['rec']==1 || empty($info['rec'])) { ?>checked<?php  } ?> >是
                        <input type="radio" value="2" name="rec" <?php  if($info['rec']==2) { ?>checked<?php  } ?>>否
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">封面图</label>
                    <div class="col-sm-9">
                        <?php  echo tpl_form_field_image('pic', $info['pic']);?>
                        <span class="help-block">*建议比例 335*185</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">轮播图</label>
                    <div class="col-sm-9" style="width: 780px;">
                        <?php  echo tpl_form_field_multi_image('imgs',$lb_imgs);?>
                        建议尺寸大小750*500
                    </div>

                </div>
                <div class="form-group" style="width: 90%;margin-left: 15px;">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">二手车简介</label>
                    <div class="col-sm-10">
                        <!-- <textarea name="content" class="form-control" cols="30" rows="7"><?php  echo $info['content'];?></textarea> -->
                        <?php  echo tpl_ueditor('content',$info['content']);?>

                    </div>
                </div>



      </div>
  </div>
        <div class="form-group">

            <input type="submit" name="submit" value="保存设置" class="btn col-lg-3" style="color: white;background-color: #444444;margin-left: 550px;"/>

            <input type="hidden" name="token" value="<?php  echo $_W['token'];?>" />
             <input type="hidden" name="id" value="<?php  echo $info['id'];?>" />

        </div>

    </form>

</div>
<script type="text/javascript">
    $(function(){
        $("#frame-8").show();
        $("#yframe-8").addClass("wyactive");
    })
</script>